sites endpoint, you can get a list of your company’s WordPress sites, details for a specific site, and details about a site’s environment (live, staging, and/or premium staging). You can also perform actions like:
- Create a new site.
- Clone an existing site.
- Create a plain site without WordPress (empty environment).
- Delete a site.
- Reset a site.
GET the following Ananlytics data for each site:
Depending on the parameters, site creation might take around one to a few minutes. This is why this endpoint responds with 202 Accepted with an operation_id in the body, which you can use with the /operations endpoint to check the progress.
You can obtain the company_id from MyKinsta > username > Company settings > Billing details.
The company_id, site_id and environment_id are shown in the URL in MyKinsta when you access an environment, for example in the URL https://my.kinsta.com/sites/details/fbab4927-e354-4044-b226-29ac0fbd20ca/c84ce214-69b9-4a32-8e67-880672cf1d38?idCompany=bdd25d71-5706-4890-870f-1adda17c505d:
- The
site_idisfbab4927-e354-4044-b226-29ac0fbd20ca - The
environment_idisc84ce214-69b9-4a32-8e67-880672cf1d38 - The
company_idisbdd25d71-5706-4890-870f-1adda17c505d
404 Not Found in the first few seconds. So, when you integrate it into your script or application, please consider this delay when polling the operation status.